import styled from 'styled-components';

export const HeaderWrapper = styled.div`
  /* position: relative; */
  height: 56px;
  border-bottom: 1px solid #f0f0f0;
  padding: 7px;
`;

export const Logo = styled.div`
  display: inline-block;
  width: 100%;
  height: 41px;
  line-height: 41px;
  background: #999999;
  text-align: center;
`;

export const Nav = styled.div`
  display: inline-block;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
  height: 41px;
  padding: 0 50px;
  background: green;
`;

export const FlexLeft = styled.div`
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
`;

export const FlexRight = styled.div`
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
`;

export const NavItem = styled.div`
  white-space: nowrap;
  display: inline-block;
  font-size: 14px;
  color: #000;
  height: 41px;
  line-height: 41px;
  background: red;
  &.left{
    margin-left: 30px;
  }
  &.right{
    margin-right: 30px;
  }
`;

export const NavSearchWrapper = styled.div`
  position: relative;
  .iconfont{
    position: absolute;
    right: 10px;
    top: 9px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
  }
`;
export const NavSearch = styled.input.attrs({
  placeholder: '搜索',
})`
  margin-left: 30px;
  width: 160px;
  height: 38px;
  line-height: 38px;
  border: none;
  padding: 0 40px 0 20px;
  outline: none;
  border-radius: 20px;
  background: #eee;
  font-size: 15px;
  &::placeholder{
    color: #999;
  }
  &.focused{
    width: 200px;
  }
  
  &.slide-enter{
    transition: all .2s ease-in-out;
  }
  &.slide-enter-active{
    width: 200px;
  }
  &.slide-exit{
    transition: all .2s ease-in-out;
  }
  &.slide-exit-active{
    width: 160px;
  }
`;

export const Addition = styled(Nav)`
  background: palegreen;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  height: 41px;
  line-height: 41px;
`;

export const AdditionButton = styled.div`
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
  box-sizing: border-box;
  color: #000;
  height: 38px;
  line-height: 38px;
  padding: 0 10px;
  border: 1px solid #ec6149;
  border-radius: 20px;
  &.reg{
    color: #ec6149;
    text-align: center;
    width: 70px;
  }
  &.writting{
    color: #fff;
    background: #ec6149;
    margin-left: 20px;
    text-align: center;
    width: 100px;
  }
`;

export const SearchInfo = styled.div`
  position: absolute;
  left: 0;
  top: 56px;
  width: 270px;
  /* height: 100px; */
  padding: 0 20px;
  box-shadow: 0 0 8px rgba(0,0,0,.2);
`;

export const SearchInfoTitle = styled.div`
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  line-height: 20px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #969696;
`;

export const SearchInfoList = styled.div`
  display: flex;
  flex-wrap: wrap;
`;

export const SearchInfoItem = styled.a`
  display: block;
  /* width: 40px; */
  margin-right: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  padding: 2px 5px;
  border: 1px solid #ddd;
  color: #333333;
  border-radius: 4px;
`;

export const SearchInfoChange = styled.div`
  font-size: 13px;
`;
